{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1、地理/逆地理\n",
    "* 地理编码/逆地理编码API是通过HTTP/HTTPS协议访问远程服务的接口，提供结构化地址与经纬度之间的相互转化的能力。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests # 用于api http request\n",
    "# api使用请求参数\n",
    "key = '3a2f932d53c08e6bc6db7af4adb1a7b0'\n",
    "def geo(address:str,city=None)-> dict:\n",
    "    parameters = {'key':key,\n",
    "                 'city':city,\n",
    "                 'citylimit': True,\n",
    "                 'address':address\n",
    "                 }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/geocode/geo?parameters\", params=parameters)\n",
    "    data = r.json()['geocodes'][0]['location']\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.679287,23.632575'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geo(\"广东省广州市从化区中山大学南方学院\",\"广州\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.632401,23.616941'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geo(\"广东省广州市从化区温泉镇政府\",\"广州\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2、路径规划\n",
    "* 路径规划API是一套以HTTP形式提供的步行、公交、驾车查询及行驶距离就散接口、返回JSON或XML格式的查询数据，用于实现路径规划功能的开发。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "def bicycling(origin,destination,sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/direction/walking?parameters'\n",
    "    params = {\n",
    "        'key':key,\n",
    "        'origin':origin,\n",
    "        'destination':destination,\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'ok',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'route': {'origin': '113.679287,23.632575',\n",
       "  'destination': '113.632401,23.616941',\n",
       "  'paths': [{'distance': '6759',\n",
       "    'duration': '5407',\n",
       "    'steps': [{'instruction': '向南步行161米右转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '161',\n",
       "      'duration': '129',\n",
       "      'polyline': '113.679592,23.632088;113.679609,23.631003;113.679609,23.631003;113.679609,23.630877;113.67964,23.630638',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西步行99米左转',\n",
       "      'orientation': '西',\n",
       "      'road': [],\n",
       "      'distance': '99',\n",
       "      'duration': '79',\n",
       "      'polyline': '113.67964,23.630634;113.679362,23.630521;113.679201,23.630473;113.679201,23.630473;113.679032,23.63043;113.679032,23.63043;113.67888,23.630404;113.67888,23.630404;113.678711,23.630365',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行237米左转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '237',\n",
       "      'duration': '190',\n",
       "      'polyline': '113.678711,23.63036;113.678711,23.62934;113.678711,23.62934;113.678711,23.629193;113.678689,23.629084;113.678637,23.629023;113.678424,23.628902;113.678368,23.628841;113.678316,23.628724;113.678294,23.628611;113.678294,23.628611;113.678277,23.628372',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行498米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '498',\n",
       "      'duration': '398',\n",
       "      'polyline': '113.678273,23.628368;113.678572,23.628338;113.678685,23.628307;113.678685,23.628307;113.678845,23.628234;113.679045,23.628073;113.679158,23.627964;113.679158,23.627964;113.679214,23.627869;113.679236,23.627778;113.67928,23.627526;113.679288,23.627322;113.679288,23.627322;113.679253,23.626853;113.679184,23.626623;113.679141,23.626497;113.679002,23.626259;113.678941,23.626176;113.678711,23.625977;113.67862,23.625864;113.678529,23.62572;113.678438,23.625191;113.678429,23.625056;113.678451,23.624939;113.678572,23.624657',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿源富街向西南步行1568米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '源富街',\n",
       "      'distance': '1568',\n",
       "      'duration': '1254',\n",
       "      'polyline': '113.678572,23.624653;113.678559,23.62451;113.678416,23.624323;113.678416,23.624323;113.677582,23.623793;113.676532,23.623346;113.676363,23.623255;113.676272,23.623151;113.676111,23.622834;113.676042,23.622739;113.67579,23.622483;113.675499,23.622279;113.675417,23.622174;113.675386,23.622088;113.675378,23.621836;113.675378,23.621836;113.675391,23.62161;113.675434,23.621476;113.675543,23.621359;113.675764,23.621181;113.675846,23.621089;113.675903,23.620994;113.675907,23.620855;113.675877,23.620725;113.675747,23.620547;113.675304,23.620052;113.675304,23.620052;113.675204,23.619974;113.675204,23.619974;113.674935,23.619718;113.673924,23.618624;113.673694,23.618433;113.673464,23.618338;113.67322,23.618277;113.671085,23.617791;113.671085,23.617791;113.667904,23.617101',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿源湖街向西步行784米右转',\n",
       "      'orientation': '西',\n",
       "      'road': '源湖街',\n",
       "      'distance': '784',\n",
       "      'duration': '627',\n",
       "      'polyline': '113.667899,23.617096;113.666345,23.61674;113.666345,23.61674;113.66592,23.616654;113.66592,23.616654;113.663555,23.616124;113.663555,23.616124;113.663225,23.616046;113.663225,23.616046;113.662578,23.615916;113.662578,23.615916;113.662036,23.615807;113.661693,23.615716;113.661693,23.615716;113.660404,23.615421',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿龙泉路向西北步行1723米向左前方行走',\n",
       "      'orientation': '西北',\n",
       "      'road': '龙泉路',\n",
       "      'distance': '1723',\n",
       "      'duration': '1378',\n",
       "      'polyline': '113.660399,23.615417;113.66,23.615668;113.66,23.615668;113.659089,23.616233;113.657166,23.617487;113.656984,23.617626;113.656819,23.617782;113.655833,23.618845;113.655686,23.618971;113.655543,23.619076;113.655421,23.619141;113.655282,23.619188;113.655087,23.619236;113.654748,23.619297;113.654514,23.619306;113.654514,23.619306;113.654332,23.619306;113.653971,23.619249;113.652895,23.619015;113.652726,23.618989;113.652574,23.618989;113.652431,23.619015;113.651819,23.61924;113.651819,23.61924;113.65082,23.619614;113.649362,23.619948;113.649362,23.619948;113.648819,23.620078;113.648355,23.620221;113.64809,23.620313;113.647869,23.620438;113.647869,23.620438;113.647378,23.620781;113.647188,23.620894;113.646966,23.620994;113.64648,23.621176;113.646328,23.621259;113.645877,23.621567;113.645877,23.621567;113.645725,23.621697',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿龙泉路向西步行67米向左前方行走',\n",
       "      'orientation': '西',\n",
       "      'road': '龙泉路',\n",
       "      'distance': '67',\n",
       "      'duration': '54',\n",
       "      'polyline': '113.64572,23.621697;113.645412,23.621788;113.645091,23.621858',\n",
       "      'action': '向左前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿温泉大道向西步行22米右转',\n",
       "      'orientation': '西',\n",
       "      'road': '温泉大道',\n",
       "      'distance': '22',\n",
       "      'duration': '18',\n",
       "      'polyline': '113.645087,23.621858;113.64487,23.621819',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '步行13米左转',\n",
       "      'orientation': [],\n",
       "      'road': [],\n",
       "      'distance': '13',\n",
       "      'duration': '10',\n",
       "      'polyline': '113.644865,23.621814;113.644848,23.62194',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '1'},\n",
       "     {'instruction': '沿温泉大道向西南步行1425米右转',\n",
       "      'orientation': '西南',\n",
       "      'road': '温泉大道',\n",
       "      'distance': '1425',\n",
       "      'duration': '1140',\n",
       "      'polyline': '113.644844,23.62194;113.644379,23.621866;113.642856,23.62171;113.642253,23.621606;113.64145,23.621359;113.64053,23.621037;113.64053,23.621037;113.639193,23.620547;113.63885,23.620417;113.638477,23.620239;113.638477,23.620239;113.63605,23.61895;113.635547,23.618672;113.635256,23.618481;113.635256,23.618481;113.634753,23.618103;113.634523,23.617895;113.634262,23.617626;113.634262,23.617626;113.633989,23.617274;113.633637,23.616784;113.633637,23.616784;113.63306,23.615916',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西北步行96米右转',\n",
       "      'orientation': '西北',\n",
       "      'road': [],\n",
       "      'distance': '96',\n",
       "      'duration': '77',\n",
       "      'polyline': '113.633056,23.615911;113.632747,23.616102;113.632747,23.616102;113.632274,23.616385',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向北步行66米到达目的地',\n",
       "      'orientation': '北',\n",
       "      'road': [],\n",
       "      'distance': '66',\n",
       "      'duration': '53',\n",
       "      'polyline': '113.63227,23.616385;113.632283,23.616541;113.632283,23.616541;113.632313,23.616688;113.632218,23.616897;113.632218,23.616931;113.632222,23.616962',\n",
       "      'action': [],\n",
       "      'assistant_action': '到达目的地',\n",
       "      'walk_type': '0'}]}]}}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bicycling(geo(\"广东省广州市从化区中山大学南方学院\",\"广州\"),geo (\"广东省广州市从化区温泉镇政府\",\"广州\"))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3、行政区域查询\n",
    "* 行政区域查询是一类简单的HTTP接口，根据用户输入的搜索条件可以帮助用户快速的查找特定的行政区域信息。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def district(keywords,subdistrict=None,page=None,offset=None,extensions='base',filter=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/config/district?parameters'\n",
    "    params = {\n",
    "        'key':key,\n",
    "        'keywords':keywords,\n",
    "        'subdistrict':subdistrict,\n",
    "        'page':page,\n",
    "        'offset':offset,\n",
    "        'extensions':extensions,\n",
    "        'filter':filter,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'suggestion': {'keywords': [], 'cities': []},\n",
       " 'districts': [{'citycode': [],\n",
       "   'adcode': '440000',\n",
       "   'name': '广东省',\n",
       "   'center': '113.280637,23.125178',\n",
       "   'level': 'province',\n",
       "   'districts': [{'citycode': '0758',\n",
       "     'adcode': '441200',\n",
       "     'name': '肇庆市',\n",
       "     'center': '112.472529,23.051546',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0757',\n",
       "     'adcode': '440600',\n",
       "     'name': '佛山市',\n",
       "     'center': '113.122717,23.028762',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0754',\n",
       "     'adcode': '440500',\n",
       "     'name': '汕头市',\n",
       "     'center': '116.708463,23.37102',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0752',\n",
       "     'adcode': '441300',\n",
       "     'name': '惠州市',\n",
       "     'center': '114.412599,23.079404',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0755',\n",
       "     'adcode': '440300',\n",
       "     'name': '深圳市',\n",
       "     'center': '114.085947,22.547',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0756',\n",
       "     'adcode': '440400',\n",
       "     'name': '珠海市',\n",
       "     'center': '113.553986,22.224979',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0759',\n",
       "     'adcode': '440800',\n",
       "     'name': '湛江市',\n",
       "     'center': '110.364977,21.274898',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0662',\n",
       "     'adcode': '441700',\n",
       "     'name': '阳江市',\n",
       "     'center': '111.975107,21.859222',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0660',\n",
       "     'adcode': '441500',\n",
       "     'name': '汕尾市',\n",
       "     'center': '115.364238,22.774485',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0768',\n",
       "     'adcode': '445100',\n",
       "     'name': '潮州市',\n",
       "     'center': '116.632301,23.661701',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0750',\n",
       "     'adcode': '440700',\n",
       "     'name': '江门市',\n",
       "     'center': '113.094942,22.590431',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0766',\n",
       "     'adcode': '445300',\n",
       "     'name': '云浮市',\n",
       "     'center': '112.044439,22.929801',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0767',\n",
       "     'adcode': '442100',\n",
       "     'name': '东沙群岛',\n",
       "     'center': '116.887312,20.617512',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0668',\n",
       "     'adcode': '440900',\n",
       "     'name': '茂名市',\n",
       "     'center': '110.919229,21.659751',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0762',\n",
       "     'adcode': '441600',\n",
       "     'name': '河源市',\n",
       "     'center': '114.697802,23.746266',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0753',\n",
       "     'adcode': '441400',\n",
       "     'name': '梅州市',\n",
       "     'center': '116.117582,24.299112',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0769',\n",
       "     'adcode': '441900',\n",
       "     'name': '东莞市',\n",
       "     'center': '113.746262,23.046237',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0663',\n",
       "     'adcode': '445200',\n",
       "     'name': '揭阳市',\n",
       "     'center': '116.355733,23.543778',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0763',\n",
       "     'adcode': '441800',\n",
       "     'name': '清远市',\n",
       "     'center': '113.051227,23.685022',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0751',\n",
       "     'adcode': '440200',\n",
       "     'name': '韶关市',\n",
       "     'center': '113.591544,24.801322',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '020',\n",
       "     'adcode': '440100',\n",
       "     'name': '广州市',\n",
       "     'center': '113.280637,23.125178',\n",
       "     'level': 'city',\n",
       "     'districts': []},\n",
       "    {'citycode': '0760',\n",
       "     'adcode': '442000',\n",
       "     'name': '中山市',\n",
       "     'center': '113.382391,22.521113',\n",
       "     'level': 'city',\n",
       "     'districts': []}]}]}"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "district ('广东')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4、搜索POI\n",
    "* 搜索服务API是一类简单的HTTP接口，提供多种查询POI信息的能力，其中包括关键字搜索、多变形搜索、ID查询四种筛选机制。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "def poi(keywords:str,city:str)-> dict:\n",
    "    parameters = {\n",
    "        'key':key,\n",
    "        'city':city,\n",
    "        'keywords':keywords,\n",
    "        'output':'json'\n",
    "    }\n",
    "    r = requests.get (\"https://restapi.amap.com/v3/place/text?parameters\", params=parameters)\n",
    "    data = r.json()\n",
    "    pois = []\n",
    "    pois.extend(data['pois'])\n",
    "    import pandas as pd\n",
    "    df_input = pd.DataFrame(pois)\n",
    "    return df_input"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>parent</th>\n",
       "      <th>childtype</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>typecode</th>\n",
       "      <th>biz_type</th>\n",
       "      <th>address</th>\n",
       "      <th>location</th>\n",
       "      <th>tel</th>\n",
       "      <th>distance</th>\n",
       "      <th>biz_ext</th>\n",
       "      <th>pname</th>\n",
       "      <th>cityname</th>\n",
       "      <th>adname</th>\n",
       "      <th>importance</th>\n",
       "      <th>shopid</th>\n",
       "      <th>shopinfo</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>photos</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>B0FFIJPVMU</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>九龙镇中新知识城九龙大道西侧ZSCN-B1-2号</td>\n",
       "      <td>113.541641,23.333302</td>\n",
       "      <td>020-89854139</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': '29.00', 'meal_order...</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>黄埔区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>B0FFIRCRJ9</td>\n",
       "      <td>B0FFIPT5GV</td>\n",
       "      <td>202</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>050000</td>\n",
       "      <td>diner</td>\n",
       "      <td>中央公园附近</td>\n",
       "      <td>113.387812,22.931549</td>\n",
       "      <td>020-31563770</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '4.5', 'cost': '30.00', 'meal_order...</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>番禺区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B0FFMCOW5F</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>上下九秀丽街名汇中华小吃街旁2楼</td>\n",
       "      <td>113.243492,23.108045</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>广州市</td>\n",
       "      <td>荔湾区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B0FFJGN3DL</td>\n",
       "      <td>B0FFJMCMJH</td>\n",
       "      <td>202</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>新会万达广场1层</td>\n",
       "      <td>113.046662,22.504894</td>\n",
       "      <td>0750-6666467</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '4.5', 'cost': '18.00', 'meal_order...</td>\n",
       "      <td>广东省</td>\n",
       "      <td>江门市</td>\n",
       "      <td>新会区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>B0FFKC7BNA</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>棉兴北路与棉新大道交叉口西150米</td>\n",
       "      <td>116.593750,23.269919</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>汕头市</td>\n",
       "      <td>潮阳区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://aos-cdn-image.amap.com/sns/ug...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B0FFLHVJXF</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>新安三路洪浪北地铁站A出口</td>\n",
       "      <td>113.910636,22.574175</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>宝安区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>B0FFG1ZUP8</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>凤岗镇油甘埔同兴路</td>\n",
       "      <td>114.172133,22.715406</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>东莞市</td>\n",
       "      <td>东莞市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B0FFM0JOWM</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>双龙大道73号首层125室商铺</td>\n",
       "      <td>113.060791,22.603695</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>江门市</td>\n",
       "      <td>蓬江区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B0FFGNZ8RP</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>兰竹苑</td>\n",
       "      <td>116.603553,23.258734</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>汕头市</td>\n",
       "      <td>潮阳区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B0FFHGRSHA</td>\n",
       "      <td>B0FFFPK5LK</td>\n",
       "      <td>202</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>华旺路北150米</td>\n",
       "      <td>113.994977,22.675617</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>龙华区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[{'url': 'http://store.is.autonavi.com/showpic...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B0FFM36CG5</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>东升二路中海水岸城生活汇</td>\n",
       "      <td>114.449392,23.075417</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>惠州市</td>\n",
       "      <td>惠城区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>B0FFKUCK6B</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>G1501广州绕城高速南200米</td>\n",
       "      <td>113.206839,22.846054</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>佛山市</td>\n",
       "      <td>顺德区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>B0FFLLAWDG</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>福华一路</td>\n",
       "      <td>114.066929,22.536737</td>\n",
       "      <td>0755-82721974</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': '3.5', 'cost': '26.00', 'meal_order...</td>\n",
       "      <td>广东省</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>福田区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>B0FFMDCW0S</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>113.183208,23.104963</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>佛山市</td>\n",
       "      <td>南海区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>B0FFM8Y2PA</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>香芒西路107号附近</td>\n",
       "      <td>114.152664,22.843904</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>东莞市</td>\n",
       "      <td>东莞市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>B0FFM58WZV</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>伦教南苑西路8号碧桂园御府</td>\n",
       "      <td>113.209092,22.861297</td>\n",
       "      <td>0757-29286974</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>佛山市</td>\n",
       "      <td>顺德区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>B0FFM4JMJN</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>114.099336,23.013096</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>东莞市</td>\n",
       "      <td>东莞市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>B0FFM4J64I</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>113.530356,22.500750</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>中山市</td>\n",
       "      <td>中山市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>B0FFM1DS7T</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;麦当劳</td>\n",
       "      <td>050302</td>\n",
       "      <td>diner</td>\n",
       "      <td>[]</td>\n",
       "      <td>113.815621,23.102564</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>东莞市</td>\n",
       "      <td>东莞市</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>B0FFM0N2FW</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>麦当劳</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>050300</td>\n",
       "      <td>diner</td>\n",
       "      <td>映月路618号附近</td>\n",
       "      <td>113.344645,22.047246</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>{'rating': [], 'cost': [], 'meal_ordering': '0'}</td>\n",
       "      <td>广东省</td>\n",
       "      <td>珠海市</td>\n",
       "      <td>金湾区</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            id      parent childtype name              type typecode biz_type  \\\n",
       "0   B0FFIJPVMU          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "1   B0FFIRCRJ9  B0FFIPT5GV       202  麦当劳  餐饮服务;餐饮相关场所;餐饮相关   050000    diner   \n",
       "2   B0FFMCOW5F          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "3   B0FFJGN3DL  B0FFJMCMJH       202  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "4   B0FFKC7BNA          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "5   B0FFLHVJXF          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "6   B0FFG1ZUP8          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "7   B0FFM0JOWM          []        []  麦当劳      餐饮服务;快餐厅;快餐厅   050300    diner   \n",
       "8   B0FFGNZ8RP          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "9   B0FFHGRSHA  B0FFFPK5LK       202  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "10  B0FFM36CG5          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "11  B0FFKUCK6B          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "12  B0FFLLAWDG          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "13  B0FFMDCW0S          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "14  B0FFM8Y2PA          []        []  麦当劳      餐饮服务;快餐厅;快餐厅   050300    diner   \n",
       "15  B0FFM58WZV          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "16  B0FFM4JMJN          []        []  麦当劳      餐饮服务;快餐厅;快餐厅   050300    diner   \n",
       "17  B0FFM4J64I          []        []  麦当劳      餐饮服务;快餐厅;快餐厅   050300    diner   \n",
       "18  B0FFM1DS7T          []        []  麦当劳      餐饮服务;快餐厅;麦当劳   050302    diner   \n",
       "19  B0FFM0N2FW          []        []  麦当劳      餐饮服务;快餐厅;快餐厅   050300    diner   \n",
       "\n",
       "                     address              location            tel distance  \\\n",
       "0   九龙镇中新知识城九龙大道西侧ZSCN-B1-2号  113.541641,23.333302   020-89854139       []   \n",
       "1                     中央公园附近  113.387812,22.931549   020-31563770       []   \n",
       "2           上下九秀丽街名汇中华小吃街旁2楼  113.243492,23.108045             []       []   \n",
       "3                   新会万达广场1层  113.046662,22.504894   0750-6666467       []   \n",
       "4          棉兴北路与棉新大道交叉口西150米  116.593750,23.269919             []       []   \n",
       "5              新安三路洪浪北地铁站A出口  113.910636,22.574175             []       []   \n",
       "6                  凤岗镇油甘埔同兴路  114.172133,22.715406             []       []   \n",
       "7            双龙大道73号首层125室商铺  113.060791,22.603695             []       []   \n",
       "8                        兰竹苑  116.603553,23.258734             []       []   \n",
       "9                   华旺路北150米  113.994977,22.675617             []       []   \n",
       "10              东升二路中海水岸城生活汇  114.449392,23.075417             []       []   \n",
       "11          G1501广州绕城高速南200米  113.206839,22.846054             []       []   \n",
       "12                      福华一路  114.066929,22.536737  0755-82721974       []   \n",
       "13                        []  113.183208,23.104963             []       []   \n",
       "14                香芒西路107号附近  114.152664,22.843904             []       []   \n",
       "15             伦教南苑西路8号碧桂园御府  113.209092,22.861297  0757-29286974       []   \n",
       "16                        []  114.099336,23.013096             []       []   \n",
       "17                        []  113.530356,22.500750             []       []   \n",
       "18                        []  113.815621,23.102564             []       []   \n",
       "19                 映月路618号附近  113.344645,22.047246             []       []   \n",
       "\n",
       "                                              biz_ext pname cityname adname  \\\n",
       "0   {'rating': '3.5', 'cost': '29.00', 'meal_order...   广东省      广州市    黄埔区   \n",
       "1   {'rating': '4.5', 'cost': '30.00', 'meal_order...   广东省      广州市    番禺区   \n",
       "2    {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      广州市    荔湾区   \n",
       "3   {'rating': '4.5', 'cost': '18.00', 'meal_order...   广东省      江门市    新会区   \n",
       "4    {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      汕头市    潮阳区   \n",
       "5    {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      深圳市    宝安区   \n",
       "6    {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      东莞市    东莞市   \n",
       "7    {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      江门市    蓬江区   \n",
       "8    {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      汕头市    潮阳区   \n",
       "9    {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      深圳市    龙华区   \n",
       "10   {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      惠州市    惠城区   \n",
       "11   {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      佛山市    顺德区   \n",
       "12  {'rating': '3.5', 'cost': '26.00', 'meal_order...   广东省      深圳市    福田区   \n",
       "13   {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      佛山市    南海区   \n",
       "14   {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      东莞市    东莞市   \n",
       "15   {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      佛山市    顺德区   \n",
       "16   {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      东莞市    东莞市   \n",
       "17   {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      中山市    中山市   \n",
       "18   {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      东莞市    东莞市   \n",
       "19   {'rating': [], 'cost': [], 'meal_ordering': '0'}   广东省      珠海市    金湾区   \n",
       "\n",
       "   importance shopid shopinfo poiweight  \\\n",
       "0          []     []        0        []   \n",
       "1          []     []        0        []   \n",
       "2          []     []        0        []   \n",
       "3          []     []        0        []   \n",
       "4          []     []        0        []   \n",
       "5          []     []        0        []   \n",
       "6          []     []        0        []   \n",
       "7          []     []        0        []   \n",
       "8          []     []        0        []   \n",
       "9          []     []        0        []   \n",
       "10         []     []        0        []   \n",
       "11         []     []        0        []   \n",
       "12         []     []        0        []   \n",
       "13         []     []        0        []   \n",
       "14         []     []        0        []   \n",
       "15         []     []        0        []   \n",
       "16         []     []        0        []   \n",
       "17         []     []        0        []   \n",
       "18         []     []        0        []   \n",
       "19         []     []        0        []   \n",
       "\n",
       "                                               photos  \n",
       "0   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "1   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "2                                                  []  \n",
       "3   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "4   [{'url': 'http://aos-cdn-image.amap.com/sns/ug...  \n",
       "5                                                  []  \n",
       "6                                                  []  \n",
       "7                                                  []  \n",
       "8   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "9   [{'url': 'http://store.is.autonavi.com/showpic...  \n",
       "10                                                 []  \n",
       "11                                                 []  \n",
       "12                                                 []  \n",
       "13                                                 []  \n",
       "14                                                 []  \n",
       "15                                                 []  \n",
       "16                                                 []  \n",
       "17                                                 []  \n",
       "18                                                 []  \n",
       "19                                                 []  "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = poi(\"麦当劳\",\"广东\")\n",
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 5、IP定位\n",
    "* IP定位是一个简单是HTTP接口，根据用户输入的IP地址，能够快速的帮用户定位IP的所在位置"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "def ip(ip=None,sig=None)->dict:\n",
    "    url = 'https://restapi.amap.com/v3/ip?parameters'\n",
    "    key = '3a2f932d53c08e6bc6db7af4adb1a7b0'\n",
    "    params = {\n",
    "        'key':key,\n",
    "        'ip':ip,\n",
    "        'sig':sig,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'province': '广东省',\n",
       " 'city': '阳江市',\n",
       " 'adcode': '441700',\n",
       " 'rectangle': '111.7604613,21.73485569;112.1927261,22.01309743'}"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ip ('183.20.145.218')#116.26.153.153"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6、静态地图\n",
    "* 静态地图服务通过返回一张地图图片响应HTTP请求，使用户能够将高德地图以图片形式嵌入自己的网页中。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "from PIL import Image\n",
    "from io import BytesIO\n",
    "def map(location,zoom,size=None,scale=1,markers=None,labels=None,paths=None,traffic=0,page=None,sig=None)-> dict:\n",
    "    url = 'https://restapi.amap.com/v3/staticmap?parameters'\n",
    "    key = '3a2f932d53c08e6bc6db7af4adb1a7b0'\n",
    "    params={\n",
    "        'key':key,\n",
    "        'location':location,\n",
    "        'zoom':zoom,\n",
    "        'size':size,\n",
    "        'scale':scale,\n",
    "        'markers':markers,\n",
    "        'labels':labels,\n",
    "        'paths':paths,\n",
    "        'traffic':traffic,\n",
    "        'sig':sig,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = Image.open(BytesIO(response.content))\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAADAFBMVEX59e779OuCg4T56t779vH79/Pw4cyCgoL79O39/f36+vn68ufu2sCjy/6CgX/u28LwtYXy59z39fE4PEL14c75+fjw4cv68Ozz46zv8PDutYny9vj69u+wtLb4+Pf3/OHQ0dDvspT59vH3693v3MLa2tipzvugn539+/t4eXm3uLX7+/z29vb57uXwxaP13cb8+vbu2b2goJ704M325NLuuZCp5XrvvZH6+frz5tPN2NvV07DU1NJwcnOz0/x8gILz6Njy8ez25dXAwL/Aw8Oboqm9vr7yyaWiyvz28eiUvOmeoaO2w9PC0OH46d/m5eLJysm8vLrT0tDv7er23MXv7eelpKKQj43xza6vrKmxsK3359fWr5OusbPvwp6joqDu8ffx8fFsbGx+nseYmJdiZWjz8e5GWG2t0Pzy5dGNm6xqhafutIbqUlIwd7ORkZCaxPnut4zznnYLkvyWlZKBiI717N/02cHj4+Pxx6Tz6Nb8/PuanqDvupGoq6vvwZzw38Wop6T59u3wwJjNz86kqrC5uLXz5tWMi4n01r3L4Pn8vHrx38ikpqf8/Pm1tbTw4Mn79/L39fDz8/D27uQzNzz16tr04s328uoWGyP58un048/utIj359rvwJrvwJvy07fxzKze6fbuvJPy483vvZXQ0M7wzmHvvpfvvYyky/ymk4Lu28Dut4xSUlK9v8Dc3No4Qk/FxMPy1bvv3cT39O37+vjwxKHNzcudnZr169zk1b7n5+by0bTutorr6+qorrPHyMa+2fnb2tb6+PP09PK0ubvz3Mj9qlH7+fW6vLzdx5Pxxqr48ebX2Njh4d/37uH38OS0tLT5+fn028Tu3MPh4tbW1tTr6eS7urjzzrDutYnutorus4b59O1DQ0ODgoD06trutIeCgX77+/v69/H59Ov29fKnzf339vL59/G41vrv28Dv3MLutIjT4/b9/f3y4sv47N6lqq319fL+/v7H45z19fPy8vCDgn/v27/59u+hyv3us4Wiy/77+PFfwrjjAABOTklEQVR4nO29DVQUV7ou3OPcO3PX0cz6ZsbxhDXRcWQRj3MiYpQ5cYIa/6+iBwwaFSJGhUSW5pBl/EcUlSgYRO+Y+KlZUVFQT77bQBAUIyzACIOcwQbNBEVAQX4UuoG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x6f/8sYHH0BCFo1buBP1WHMWjeuCFCyMWbiodOHIF+umLpoWCwlZGHswpmLO9CHTpw9ZRBMC+yR4txOolUMpgV/WQyZoAcDVHws5WYCPw2p/AQ/Sv63/aP0J2N2tR/ApdZoQHbR5L1QyfKxFX5CEpEzNjklZFvNg55Curtiez7Ln/GnOothp19csup696GDPwkXXx30GbeHS0pGLYhkdgrQ3pOIFrG5Y8eu/hSYX1hwvMCFTEQushCBNg39bvx59/gTz8ZFPh9CE/FhZWXnhwn/8B9briJvKXCghaxZ9Bkcic0pjp07riv1TzMjY6dMXbv5T/IPs5M+yNw8Zt/NgafaQIT//+S/iY9fQZu/aE7/+8tsvodn07YmPkFpHltQCWlVjBf/tl3Q3hQj5CEkJ+m3BiY9OsILxkU9CmC7r1Vdf/fzCf+y8UAUJmf12Wd4sKCFdi6a9Aofp33QtvP5i2qLr17sWLVwIR+ULFy28Pm0hxKJvpi1aSOMgM1J/QSvlBegPV7kLPmE+vFiwAKpywfAR/fbJWnzCJ5DLLz+x/IODIeTgBx/89tXKz//5bFTcgk9ffAJx0O25rAWi+nm9404JWlnqvtzfIxhC1g0s/WBe5YU/l0cMDTr7CWTkoAqzvaKt/R9eBFyAWw9Z/cHnlReW+i1d2nsWyUeXEj58c1nug1sxnNYT9uOPZzEOHjyobH3KR4j78K2pexl8XideBh8hXob/HwYj8UzU3gCVAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<PIL.PngImagePlugin.PngImageFile image mode=P size=400x400 at 0x1F921217BE0>"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 阳江位置地图\n",
    "map(location='111.975107,21.859222',zoom=7)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 7、坐标转换\n",
    "* 坐标转换是一类简单的HTTP接口，能够将用户输入的非高德坐标（GPS坐标、mapbar坐标、baidu坐标）转换成高德坐标。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 将汕头的经纬度转换为GPS坐标\n",
    "def cs(locations,coordsys=None,sig=None,)-> dict:\n",
    "    url = 'https://restapi.amap.com/v3/assistant/coordinate/convert?parameters'\n",
    "    key = '3a2f932d53c08e6bc6db7af4adb1a7b0'\n",
    "    params={\n",
    "        'key':key,\n",
    "        'locations':locations,\n",
    "        'coordsys':coordsys,\n",
    "        'sig':sig,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'ok',\n",
       " 'infocode': '10000',\n",
       " 'locations': '111.980161946615,21.85646999783'}"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cs(locations='111.975107,21.859222',coordsys='gps')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 8、天气查询\n",
    "* 天气查询是一个简单的HTTP接口，根据用户输入的adcode，查询目标区域当前/未来的天气情况。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "def tq(city,extensions='base')-> dict:\n",
    "    url = 'https://restapi.amap.com/v3/weather/weatherInfo?parameters'\n",
    "    key = '3a2f932d53c08e6bc6db7af4adb1a7b0'\n",
    "    params={\n",
    "        'key':key,\n",
    "        'city':city,\n",
    "        'extensions':extensions,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'lives': [{'province': '广东',\n",
       "   'city': '江城区',\n",
       "   'adcode': '441702',\n",
       "   'weather': '阴',\n",
       "   'temperature': '20',\n",
       "   'winddirection': '北',\n",
       "   'windpower': '≤3',\n",
       "   'humidity': '90',\n",
       "   'reporttime': '2020-04-23 12:22:38'}]}"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tq(city='441702')#查询阳江市江城区的天气"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 9、输入提示\n",
    "* 输入提示是一类简单的HTTP接口，提供根据用户输入的关键词查询返回建议列表。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "def sr(keywords,type=\"分类代码\",location=None,city=None,citylimit='false',datatype='all',sig=None)-> dict:\n",
    "    url = 'https://restapi.amap.com/v3/assistant/inputtips?parameters'\n",
    "    key = '3a2f932d53c08e6bc6db7af4adb1a7b0'\n",
    "    params={\n",
    "        'key':key,\n",
    "        'type':type,\n",
    "        'keywords':keywords,\n",
    "        'location':location,\n",
    "        'city':city,\n",
    "        'citylimit':citylimit,\n",
    "        'datatype':datatype,\n",
    "        'sig':sig,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '10',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'tips': [{'id': [],\n",
       "   'name': '肯德基',\n",
       "   'district': [],\n",
       "   'adcode': [],\n",
       "   'location': [],\n",
       "   'address': [],\n",
       "   'typecode': [],\n",
       "   'city': []},\n",
       "  {'id': 'B029601DVN',\n",
       "   'name': '肯德基(三环店)',\n",
       "   'district': '广东省阳江市江城区',\n",
       "   'adcode': '441702',\n",
       "   'location': '111.980794,21.852668',\n",
       "   'address': '名扬国际广场商业区5幢201室.202号名扬国际广场1层',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B02960NP4W',\n",
       "   'name': '肯德基(天润广场店)',\n",
       "   'district': '广东省阳江市江城区',\n",
       "   'adcode': '441702',\n",
       "   'location': '111.967362,21.854205',\n",
       "   'address': '东风一路11号天润广场1层',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFHI3BUD',\n",
       "   'name': '肯德基(百利广场店)',\n",
       "   'district': '广东省阳江市江城区',\n",
       "   'adcode': '441702',\n",
       "   'location': '111.964473,21.853768',\n",
       "   'address': '东风一路3号百利广场一层',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B02960NP4D',\n",
       "   'name': '肯德基(北环路店)',\n",
       "   'district': '广东省阳江市江城区',\n",
       "   'adcode': '441702',\n",
       "   'location': '111.958022,21.856565',\n",
       "   'address': '北环路大润发1层',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFHDRJHW',\n",
       "   'name': '肯德基(新江北店)',\n",
       "   'district': '广东省阳江市江城区',\n",
       "   'adcode': '441702',\n",
       "   'location': '111.963545,21.872560',\n",
       "   'address': '西平路以西,新江北路以北S2地块君怡花园小区二期中心商场首层',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFIW6F5Y',\n",
       "   'name': '肯德基(盈信广场店)',\n",
       "   'district': '广东省阳江市江城区',\n",
       "   'adcode': '441702',\n",
       "   'location': '111.994535,21.863130',\n",
       "   'address': '东风三路88号盈信广场首层',\n",
       "   'typecode': '050000',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFIY6YY7',\n",
       "   'name': '肯德基(新达城店)',\n",
       "   'district': '广东省阳江市江城区',\n",
       "   'adcode': '441702',\n",
       "   'location': '111.953880,21.871408',\n",
       "   'address': '新江北路北侧、创业路东侧福盈新达城首层',\n",
       "   'typecode': '050000',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFJ1WKX7',\n",
       "   'name': '肯德基(新都汇店)',\n",
       "   'district': '广东省阳江市江城区',\n",
       "   'adcode': '441702',\n",
       "   'location': '111.972354,21.829788',\n",
       "   'address': '东门南路333号新都汇时代广场购物中心二期2号楼一层1001-1003铺、1005-1009铺',\n",
       "   'typecode': '050300',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFLMTWBG',\n",
       "   'name': '肯德基',\n",
       "   'district': '广东省阳江市江城区',\n",
       "   'adcode': '441702',\n",
       "   'location': '111.971098,21.828882',\n",
       "   'address': [],\n",
       "   'typecode': '050301',\n",
       "   'city': []}]}"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sr(keywords=\"肯德基\",city=\"441702\")#查询阳江市的肯德基"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 10、交通态势\n",
    "* 交通态势是一类简单的HTTP接口，提供根据用户输入的内容能够返回希望查询的交通态势情况。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "def jt(location,level=None,extensions='base',sig=None,radius=None)-> dict:\n",
    "    url = 'https://restapi.amap.com/v3/traffic/status/circle?parameters'\n",
    "     key = '3a2f932d53c08e6bc6db7af4adb1a7b0'\n",
    "    params={\n",
    "        'key':key,\n",
    "        'location':location,\n",
    "        'level':level,\n",
    "        'location':location,\n",
    "        'extensions':extensions,\n",
    "        'radius':radius,\n",
    "        'sig':sig,\n",
    "        'output':'json'\n",
    "    }\n",
    "    response = requests.get(url,params=params)\n",
    "    data = response.json()\n",
    "    return data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'trafficinfo': {'description': '文慧园北路：自南向北畅通，反向缓慢。',\n",
       "  'evaluation': {'expedite': '96.00%',\n",
       "   'congested': '2.00%',\n",
       "   'blocked': '0.00%',\n",
       "   'unknown': '2.00%',\n",
       "   'status': '1',\n",
       "   'description': '整体畅通'}}}"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "jt(location='116.351147,39.966309',radius='1500')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 11、地理围栏\n",
    "* 地理围栏服务是一类HTTP接口，提供在服务端，增删改查地理围栏的功能，同时支持对于设备与围栏关系进行监控。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 创建地理围栏\n",
    "def meta(name=None,center=None,radius=\"2000\",enable=\"True\",valid_time=\"2020-05-19\",repeat=\"Mon,Tues,Wed,Thur,Fri,Sat,Sun\",time=\"00:00,11:59;13:00,20:59\",desc=\"测试围栏描述\",alert_condition=\"enter;leave\")->dict:\n",
    "    url = 'https://restapi.amap.com/v4/geofence/meta?key=ddbf84e30516af49ba00bd1afa61a233'\n",
    "     key = '3a2f932d53c08e6bc6db7af4adb1a7b0'\n",
    "    params={\n",
    "        'key':key,\n",
    "    }\n",
    "    data = {\n",
    "        \"name\":name,\n",
    "        \"center\":center,\n",
    "        \"radius\":radius,\n",
    "        \"enable\":enable,\n",
    "        \"valid_time\":valid_time,\n",
    "        \"repeat\":repeat,\n",
    "        \"time\":time,\n",
    "        \"desc\":desc,\n",
    "        \"alert_condition\":alert_condition,\n",
    "    }\n",
    "    response = requests.post(url,params=params,json=data)\n",
    "    data = response.json()\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': {'gid': '96134bad-8b66-4356-98b2-0b234d0eae8e',\n",
       "  'id': '0',\n",
       "  'message': '成功',\n",
       "  'status': '0'},\n",
       " 'errcode': 0,\n",
       " 'errdetail': None,\n",
       " 'errmsg': 'OK',\n",
       " 'ext': None}"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qu = meta(name='名称',center='116.481498,39.990375')\n",
    "qu"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 12、轨迹纠偏\n",
    "* 根据坐标点抓取道路，即根据给定的坐标点、车辆的方位角以及行驶速度，将用户的轨迹纠偏到路上，从而返回用户实际驾车经过的道路坐标。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [],
   "source": [
    "def grasproad()-> dict:\n",
    "    url = 'https://restapi.amap.com/v4/grasproad/driving'\n",
    "\n",
    "    params={\n",
    "        'key':key,\n",
    "    }\n",
    "    data = [{\n",
    "\"x\": 116.449429,\n",
    "\"y\": 40.014844,\n",
    "\"sp\": 4,\n",
    "\"ag\": 110,\n",
    "\"tm\": 1478831753\n",
    "}, {\n",
    "\"x\": 116.449639,\n",
    "\"y\": 40.014776,\n",
    "\"sp\": 3,\n",
    "\"ag\": 110,\n",
    "\"tm\": 23\n",
    "}, {\n",
    "\"x\": 116.449859,\n",
    "\"y\": 40.014716,\n",
    "\"sp\": 3,\n",
    "\"ag\": 111,\n",
    "\"tm\": 33\n",
    "}, {\n",
    "\"x\": 116.450074,\n",
    "\"y\": 40.014658,\n",
    "\"sp\": 3,\n",
    "\"ag\": 110,\n",
    "\"tm\": 31\n",
    "}, {\n",
    "\"x\": 116.450273,\n",
    "\"y\": 40.014598,\n",
    "\"sp\": 3,\n",
    "\"ag\": 111,\n",
    "\"tm\": 20\n",
    "}]\n",
    "    response = requests.post(url,params=params,json=data)\n",
    "#response.status_code\n",
    "#response.content\n",
    "    result = response.json()\n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'result' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-60-d04a1403ca00>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mresult\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'result' is not defined"
     ]
    }
   ],
   "source": [
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 13、批量接口\n",
    "* 批量接口通过用户传入合并后的请求，同时返回多个请求的顺序集合，目前最多支持20个子请求。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "def batch()->dict:\n",
    "    url = \"https://restapi.amap.com/v3/batch?key=ddbf84e30516af49ba00bd1afa61a233\"\n",
    "    headers = {\n",
    "    'Content-Type':'application/json',\n",
    "    }\n",
    "    data = {\n",
    "    \"ops\": [\n",
    "        {\n",
    "            \"url\": \"/v3/place/around?offset=10&page=1&key=<您的key>&location=116.50394379585519,39.278209477408794&output=json&radius=100000&types=080000\"\n",
    "        },\n",
    "        {\n",
    "            \"url\": \"/v3/place/around?offset=10&page=1&key=<您的key>&location=118.50394379585519,39.278209477408794&output=json&radius=100000&types=080000\"\n",
    "        }\n",
    "    ]\n",
    "}\n",
    "    params = {\n",
    "        \"keyt\":key,\n",
    "    }\n",
    "    response = requests.post(url,headers=headers,params=params,json=data)\n",
    "    response.status_code\n",
    "    #response.content\n",
    "    #results = response.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'results' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-27-100f62972f2f>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mresults\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m: name 'results' is not defined"
     ]
    }
   ],
   "source": [
    "results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
